import request from '@/utils/request'
import { getToken } from '@/utils/auth'

// 获取所有的评价标签
export function fetchListTag(query) {
  return request({
    url: '/wxh-cloud-rest/rest/' + getToken() + '/evaluationtag/getOrdeUserEltTags',
    method: 'get',
    params: query
  })
}

// 修改评价标签
export function updateTag(param) {
  return request({
    url: '/wxh-cloud-rest/rest/' + getToken() + '/evaluationtag/update',
    method: 'get',
    params: param
  })
}

// 删除评价标签
export function deleteTag(param) {
  return request({
    url: '/wxh-cloud-rest/rest/' + getToken() + '/evaluationtag/delete',
    method: 'get',
    params: param
  })
}

export function addTag(param) {
  return request({
    url: '/wxh-cloud-rest/rest/' + getToken() + '/evaluationtag/add',
    method: 'get',
    params: param
  })
}

// 获取工单评分
export function getOrdeScores(query) {
  return request({
    url: '/wxh-cloud-rest/rest/' + getToken() + '/ordeScore/getOrdeScores',
    method: 'get',
    params: query
  })
}

// 获取工单评分
export function getScoreDetail(param) {
  return request({
    url: '/wxh-cloud-rest/rest/' + getToken() + '/ordeScore/getScoreDetail',
    method: 'get',
    params: param
  })
}
